package com.yufuchang;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * Created by yufuchang on 2020/8/1.
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public Book hello(){
        Book book = new Book();
        book.setName("SpringBoot 视频教程");
        book.setAuthor("yufuchang");
        book.setPrice(30f);
        book.setPublicationDate(new Date());
        return book;
    }
}
